import {baseRequest} from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/process/comp/version/` + url, ...arg)

export default {
	async getLastByCodeAndVersion(data) {
		return await request('build/get_last_by_code_and_version', data, 'post')
	},
	async queryCompVersionList(data){
		return await request('list', data, 'post')
	},
	async save(data){
		return await request('save', data, 'post')
	},
	async getById(data){
		return await request('get_by_id', data, 'post')
	},
	async setStatusFlag(data){
		return await request('set_status_flag', data, 'post')
	},
	async rebuild(data){
		return await request('rebuild', data, 'post')
	},
	async removeById(data){
		return await request('remove_by_id', data, 'post')
	}
}
